#include"app_buffer.h"
#include"stdio.h"


int main()
{
    app_buffer_t *buffer = app_buffer_init();
    app_buffer_write(buffer, "hello world", 11);
    app_buffer_write(buffer, "hello aaaaa", 11);

    char tmp_buff[256];
    int read_size= app_buffer_read(buffer, tmp_buff, 256);
    printf("read text  is  %.*s\n",read_size,tmp_buff);
    read_size= app_buffer_read(buffer, tmp_buff, 256);
    printf("read text  is  %.*s\n",read_size,tmp_buff);

    app_buffer_destroy(buffer);
    return 0;
}